import request from '@/utils/request'

// 列表数据
export function getNoticeList(data) {
  return request({
    url: '/archive/annu/findPage',
    method: 'post',
    data: data
  })
}

// 上传文件
export function uploadFile(data) {
  return request({
    url: '/archive/annu/uploadFile',
    method: 'post',
    data: data
  })
}

// 删除文件
export function deleteFile(data) {
  return request({
    url: '/archive/annu/deleteFile',
    method: 'delete',
    data: data
  })
}

// 添加年检通知
export function addNotice(data) {
  return request({
    url: '/archive/annu/save',
    method: 'post',
    data: data
  })
}

// 修改年检通知
export function updateNotice(data) {
  return request({
    url: '/archive/annu/update',
    method: 'put',
    data: data
  })
}

// 获取年检通知详情
export function findById(query) {
  return request({
    url: '/archive/annu/findById',
    method: 'get',
    params: query
  })
}

// 删除年检通知
export function deleteNotice(query) {
  return request({
    url: '/archive/annu/delete',
    method: 'delete',
    params: query
  })
}

// 获取下发单位
export function getDept(data) {
  return request({
    url: '/archive/annu/findUnit',
    method: 'post',
    data: data
  })
}

// 年检下发
export function send(data) {
  return request({
    url: '/archive/annu/send',
    method: 'post',
    data: data
  })
}


export function findNoticeList(data) {
  return request({
    url: '/archive/annu/findNoticeList',
    method: 'post',
    data: data
  })
}

export function yearReportCount(noticeId,year) {
  return request({
    url: '/archive/annu/yearReportCount?noticeId='+noticeId+'&year='+year,
    method: 'get'
  })
}
export function checkIsUpload(id) {
  return request({
    url: '/archive/annu/checkIsUpload?id='+id,
    method: 'get'
  })
}
export function checkIsAdd(id) {
  return request({
    url: '/archive/annu/checkIsAdd?id='+id,
    method: 'get'
  })
}
export function download(data,noticeId) {
  return request({
    url: '/archive/annu/download?totalNoticeId='+noticeId,
    method: 'post',
    data: data
  })
}

